home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-13 / emacs16d.zip / _KEYS.MIN < prev    next >
Text File  |  1991-08-11  |  4KB  |  236 lines

  1.  
  2.  
  3.  
  4. Name:F:bind-to-key
  5. Bind a key to a function.  Prompts for a function name and key.
  6. [*]#(Finsist,(arg1),SELF,(
  7.     #(Fresolve-name,arg1,(#(Fbind-key,##(temp))))
  8. ))
  9. [*]
  10.  
  11.  
  12. Name:F:digit-argument
  13. Start parsing meta digits as a numeric argument.
  14. [*]    
  15. #(an,C-u arg2arg1)
  16. #(Fargument-do,#(g),arg2arg1)
  17. [*]
  18.  
  19.  
  20. Name:F:negative-argument
  21. [*]    
  22. #(==,arg1,,(
  23.     #(an,C-u -)
  24.     #(Fargument-do,#(g),-)
  25. ),(
  26.     #(an,C-u #(--,0,arg1))
  27.     #(Fargument-do,#(g),#(--,0,arg1))
  28. ))
  29. [*]
  30.  
  31.  
  32. Name:F:prefix-C-c 
  33. Parse C-c prefix characters, i.e. C-c.
  34. [*]    
  35. #(==,arg1,,(
  36.     #(an,C-c )
  37.     #(d,C-c #(g)#(an))
  38.     ##(result)
  39. ),(
  40.     #(an,C-u arg1 C-c )
  41.     #(Fargument-execute,C-c #(g)#(an),arg1)
  42. ))[*]
  43.  
  44.  
  45. Name:F:prefix-C-x 
  46. Parse C-x prefix characters, i.e. C-x.
  47. [*]    
  48. #(==,arg1,,(
  49.     #(an,C-x )
  50.     #(d,C-x #(g)#(an))
  51.     ##(result)
  52. ),(
  53.     #(an,C-u arg1 C-x )
  54.     #(Fargument-execute,C-x #(g)#(an),arg1)
  55. ))[*]
  56.  
  57.  
  58. Name:F:prefix-C-x 4 
  59. Parse C-x 4 prefix characters, i.e. C-x 4.
  60. [*]    
  61. #(==,arg1,,(
  62.     #(an,C-x 4 )
  63.     #(d,C-x 4 #(g)#(an))
  64.     ##(result)
  65. ),(
  66.     #(an,C-u arg1 C-x 4 )
  67.     #(Fargument-execute,C-x 4 #(g)#(an),M-x)
  68. ))[*]
  69.  
  70.  
  71. Name:F:prefix-M-
  72. Parse M- prefix characters, i.e. Escape.
  73. [*]    
  74. #(==,arg1,,(
  75.     #(an,M-)
  76.     #(d,M-#(g)#(an))
  77.     ##(result)
  78. ),(
  79.     #(an,C-u arg1 M-)
  80.     #(Fargument-execute,M-#(g)#(an),arg1)
  81. ))[*]
  82.  
  83.  
  84. Name:F:unbind-key
  85. Remove a key binding.
  86. [*]#(an,Enter-key-to-unassign?)
  87. #(es,K.#(Fget-key-with-prefixes))
  88. #(ds,Kmodified)
  89. #(an)
  90. [*]
  91.  
  92.  
  93. Name:F:universal-argument
  94. Prompt for a numeric argument.  Default to four.  If pressed again, multiply
  95. the count by four.
  96. [*]    
  97. #(==,arg1,,(
  98.     #(an,C-u 4)
  99.     #(Fargument-do,#(g),,1)
  100. ),(
  101.     #(an,C-u #(**,arg1,4))
  102.     #(Fargument-do,#(g),,arg1)
  103. ))[*]
  104.  
  105.  
  106. Name:Fargument-do
  107. Decide if arg1 is another argument character.  If not, execute it.
  108. The first line decides if arg1 is a number or else if it is a dash at the
  109. beginning.
  110. [*]#(==,#(g?,1arg1,9,yes,(#(==,arg2arg1,-,yes,no))),yes,(
  111.     #(an,C-u arg2arg1)
  112.     #(SELF,#(g),arg2arg1)
  113. ),(
  114.     #(an)
  115.     #(==,arg3,,(
  116.         #(Fargument-execute,arg1,arg2)
  117.     ),(
  118.         #(Fargument-execute,arg1,#(**,arg3,4))
  119.     ))
  120. ))[*]
  121.  
  122.  
  123. Name:Fargument-execute
  124. Decide if a function knows how to deal with an argument.  If not, use the
  125. argument as a repeat count.
  126. [*]#(n?,K.arg1,(
  127.         #(==,##(go,#(K.arg1))#(rs,#(K.arg1)),(    ),(
  128.             #(#(K.arg1),arg2)
  129.         ),(
  130.             #(Floop,(#(ds,result,#(#(K.arg1)))),arg2)
  131.             ##(result)
  132.         ))
  133. ),(
  134.     #(Floop,(#(ds,result,#(Fself-insert,arg1))),arg2)
  135.     ##(result)
  136. ))
  137. [*]
  138.  
  139.  
  140. Name:Fbind-key
  141. Find the key arg2 to the function arg1.  Prompt for arg2 if missing.
  142. RFS: If arg2 is C-g, make sure the user does it on purpose.
  143. [*]#(==,arg2,,(
  144.     #(an,Enter key to bind arg1 to?)
  145.     #(SELF,arg1,#(Fget-key-with-prefixes)#(an))
  146. ),(
  147.     #(==,no,#(==,F:ring-the-bell,#(K.arg2),(
  148.             #(Fyes-or-no,Are you SURE you want to change arg2 to arg1 ? ,,no)
  149.         )
  150.     ),,(
  151.         #(ds,K.arg2,arg1)
  152.         #(ds,Kmodified)
  153.     ))
  154. ))
  155. [*]
  156.  
  157.  
  158. Name:Fkey2char.KP+
  159. [*]+[*]
  160.  
  161.  
  162. Name:Fkey2char.KP-
  163. [*]-[*]
  164.  
  165.  
  166. Name:Fkey2char.KP.
  167. [*].[*]
  168.  
  169.  
  170. Name:Fkey2char.KP0
  171. [*]0[*]
  172.  
  173.  
  174. Name:Fkey2char.KP1
  175. [*]1[*]
  176.  
  177.  
  178. Name:Fkey2char.KP2
  179. [*]2[*]
  180.  
  181.  
  182. Name:Fkey2char.KP3
  183. [*]3[*]
  184.  
  185.  
  186. Name:Fkey2char.KP4
  187. [*]4[*]
  188.  
  189.  
  190. Name:Fkey2char.KP5
  191. [*]5[*]
  192.  
  193.  
  194. Name:Fkey2char.KP6
  195. [*]6[*]
  196.  
  197.  
  198. Name:Fkey2char.KP7
  199. [*]7[*]
  200.  
  201.  
  202. Name:Fkey2char.KP8
  203. [*]8[*]
  204.  
  205.  
  206. Name:Fkey2char.KP9
  207. [*]9[*]
  208.  
  209.  
  210. Name:Flocal-bind-key
  211. Define a local key binding, remembering it for later removal from the key map.
  212. [*]#(Fredefine,arg1,(arg2))
  213. #(ds,local-mode-changes,##(local-mode-changes)(#(Funredefine,arg1)))
  214. [*]
  215.  
  216.  
  217. Name:Fvalid-key
  218. Waits for a key to be pressed. If the key isn't bound to F:ring-the-bell
  219. (like C-g is) then return arg1 with is-SELF set to the key. As an alternative
  220. to pure #(g), it allows the coming actions to be interrupted.
  221. It *is* possible to execute arg1 with is-SELF as C-g, if the user explicitly
  222. says so in Fvalid-key.
  223. [*]
  224. #(ds,is-SELF,#(g))
  225. #(==,F:ring-the-bell,#(K.#(is-SELF)),(
  226.     #(F:ring-the-bell)
  227. ),(
  228.     #(==,F:quoted-insert,#(K.#(is-SELF)),(
  229.         #(an,Enter control character ? )
  230.         #(ds,is-SELF,#(g))
  231.         #(an)
  232.     ))
  233.     arg1
  234. ))
  235. #(es,is-SELF)
  236. [*]